.movie {
  display: grid;
  grid-gap: 5px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-top: 1rem;
  min-height: 350px;
}

.card {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.card:hover .movie_details {
  bottom: 0;
  transition: all 0.5s;
}

.card:hover .poster:before {
  bottom: 0;
}

.card:hover .poster img {
  filter: blur(2px);
  transform: translateY(-40px);
}

.card .poster {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-bottom: 150%;
}

.card .poster img {
  transition: 0.5s;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-top: 0;
  margin-bottom: 0;
}

.card .poster:before {
  content: "";
  position: absolute;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.808) 60%, transparent);
  height: 100%;
  width: 100%;
  z-index: 1;
  bottom: 0;
  bottom: -100%;
  left: 0;
  transition: 0.5s;
}

.movie_details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  position: absolute;
  padding: 15px;
  width: 100%;
  height: 82%;
  box-sizing: border-box;
  left: 0;
  bottom: -400px;
  z-index: 2;
  transition: all 0.4s ease;
}

.movie_details h2 {
  color: #fff;
  font-size: 20px;
  margin: 0;
  padding: 0;
}

.movie_details p {
  color: #cccccc; /* 设置文字为灰色 */
}

/* // 页面宽度大于700小于900样式 */
@media screen and (min-width: 700px) and (max-width: 900px) {
  .movie {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    min-height: 250px;
    margin-top: 3rem;
  }
}

/* // 页面宽度小于700样式 */
@media (max-width: 700px) {
  .movie {
    width: 100%;
    margin-left: 0;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    min-height: 200px;
    margin-top: 0.5rem;
  }
}

/* 原始的 react-medium-image-zoom 样式 */
[data-rmiz-ghost] {
  position: absolute;
  pointer-events: none;
}
[data-rmiz-btn-zoom],
[data-rmiz-btn-unzoom] {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
  color: #fff;
  height: 40px;
  margin: 0;
  outline-offset: 2px;
  padding: 9px;
  touch-action: manipulation;
  width: 40px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
[data-rmiz-btn-zoom]:not(:focus):not(:active) {
  position: absolute;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  pointer-events: none;
  white-space: nowrap;
  width: 1px;
}
[data-rmiz-btn-zoom] {
  position: absolute;
  inset: 10px 10px auto auto;
  cursor: zoom-in;
}
[data-rmiz-btn-unzoom] {
  position: absolute;
  inset: 20px 20px auto auto;
  cursor: zoom-out;
  z-index: 1;
}
[data-rmiz-content="found"] img,
[data-rmiz-content="found"] svg,
[data-rmiz-content="found"] [role="img"],
[data-rmiz-content="found"] [data-zoom] {
  cursor: zoom-in;
}
[data-rmiz-modal]::backdrop {
  display: none;
}
[data-rmiz-modal][open] {
  position: fixed;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
[data-rmiz-modal-overlay] {
  position: absolute;
  inset: 0;
  transition: background-color 0.3s;
}
[data-rmiz-modal-overlay="hidden"] {
  background-color: rgba(255, 255, 255, 0);
}
[data-rmiz-modal-overlay="visible"] {
  background-color: rgba(255, 255, 255, 1);
}
[data-rmiz-modal-content] {
  position: relative;
  width: 100%;
  height: 100%;
}
[data-rmiz-modal-img] {
  position: absolute;
  cursor: zoom-out;
  image-rendering: high-quality;
  transform-origin: top left;
  transition: transform 0.3s;
}
@media (prefers-reduced-motion: reduce) {
  [data-rmiz-modal-overlay],
  [data-rmiz-modal-img] {
    transition-duration: 0.01ms !important;
  }
}

/* 暗色模式下的覆盖样式 */
.dark [data-rmiz-modal-overlay] {
  background-color: rgba(0, 0, 0, 0);
}

.dark [data-rmiz-modal-overlay="visible"] {
  background-color: rgba(0, 0, 0, 1);
}

.dark [data-rmiz-btn-zoom],
.dark [data-rmiz-btn-unzoom] {
  background-color: rgba(255, 255, 255, 0.7);
}
